package pl.alef.web.inter;

import javax.servlet.http.HttpServletRequest;

/**
 * 
 * @author alef
 *
 */
public class A {
	
	public static final String ATTR_START_KEY = "A1_ATTR_START_KEY";
	public static final String ATTR_POST_KEY = "A1_ATTR_POST_KEY";
	
	public static long  getTimeTotal(HttpServletRequest request) {
		final long end = System.currentTimeMillis();
		final Long start = (Long)request.getAttribute(ATTR_START_KEY);
		if(start != null)
			return end-start;
		return 0;
	}
}
